#!/usr/bin/perl
###########################################
# prototype -- use a Class::Prototyped appender
# Mike Schilli, 2004 (m@perlmeister.com)
###########################################
use warnings;
use strict;

use Class::Prototyped;

my $class = Class::Prototyped->newPackage(
  "MyAppenders::Bulletizer",
  bullets => 1,
  log     => sub {
    my($self, %params) = @_;
    print "*" x $self->bullets(),
          $params{message};
  },
);

use Log::Log4perl qw(:easy);

Log::Log4perl->init(\ q{
  log4perl.logger = INFO, Bully

  log4perl.appender.Bully=MyAppenders::Bulletizer
  log4perl.appender.Bully.bullets=3

  log4perl.appender.Bully.layout = PatternLayout
  log4perl.appender.Bully.layout.ConversionPattern=%m %n
});

    # ... prints: "***Boo!\n";
INFO "Boo!";
